	<!DOCTYPE html>
	<html lang="en">
	<head>
	<meta charset="UTF-8">
	<title>Keyboard Controlled Music Player</title>
	</head>
	<body>
	<h1>Press keys A, S, D to play different music</h1>
	<audio id="musicA" src="./1.mp3"></audio>
	<audio id="musicS" src="./2.mp3"></audio>
	<audio id="musicD" src="./3.mp3"></audio>
	<script>
	document.addEventListener('keydown', (event) => {
	 const key = event.key;
	 switch (key) {
	   case 'a':
	   case 'A':
	     playMusic('musicA');
	     break;
	   case 's':
	   case 'S':
	     playMusic('musicS');
	     break;
	   case 'd': 
	   case 'D':
	     playMusic('musicD');
	     break;
	 }
	});
	function playMusic(id) {
	 // 停止所有音乐
	 document.querySelectorAll('audio').forEach(audio => {
	   audio.pause();
	   audio.currentTime = 0;
	 });
	 // 播放指定的音乐
	 const music = document.getElementById(id);
	 music.play();
	}
	</script>
	</body>
	</html>